﻿using nzy3D.Maths;
using nzy3D.Plot3D.Builder;
using nzy3D.Plot3D.Builder.Concrete;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace nzy3d_winformsDemo
{
    public class MyGrid : OrthonormalGrid
    {
        public MyGrid() : base(null, 0)
        {
            
        }
        public override List<Coord3d> Apply(nzy3D.Plot3D.Builder.Mapper mapper)
        {
            
            List<Coord3d> output = new List<Coord3d>();
            for (int xi = 0; xi <= 80 - 1; xi++)
            {
                for (int yi = 0; yi <= 80 - 1; yi++)
                {
                    double x = xi - 40;
                    double y = yi - 40;



                    if (x * x + y * y < 40 * 40)
                    {
                        output.Add(new Coord3d(xi, yi, mapper.f(xi, yi)));
                    }
                }
            }
            return output;
        }
    }
}
